package com.mvvm.start.main.mvvm.vm

import androidx.lifecycle.MutableLiveData
import com.mvvm.start.base.base.BaseViewModel
import com.mvvm.start.base.bean.UserInfoResult
import com.mvvm.start.main.mvvm.m.MineRepository

/**
 * @author
 * @功能:我的Fragment
 * @Creat 12/23/20 11:30 AM
 * @Compony 465008238@qq.com
 */
class MineFragmentViewModle : BaseViewModel() {
    val userInfo = MutableLiveData<UserInfoResult?>()
    fun getUserInfo() {
        checkResult(handlerException = {
            userInfo.postValue(null)
        }) {
            userInfo.postValue(MineRepository.getUserInfo())
        }

    }
}